import {createRouter, createWebHistory} from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue')

    },
    {
        path: '/about',
        name: 'About',
        // 路由级代码拆分会为此路由生成一个单独的块（about.[hash].js），该块在访问该路由时被延迟加载。
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/daohang',
        name: 'daohang',
        // 路由级代码拆分会为此路由生成一个单独的块（about.[hash].js），该块在访问该路由时被延迟加载。
        component: () => import(/* webpackChunkName: "about" */ '../views/DaoHang.vue')
    },
    {
        path: '/book',
        name: 'book',
        // 路由级代码拆分会为此路由生成一个单独的块（about.[hash].js），该块在访问该路由时被延迟加载。
        component: () => import(/* webpackChunkName: "about" */ '../views/book.vue')
    },
    {
        path: '/post',
        name: 'post',
        // 路由级代码拆分会为此路由生成一个单独的块（about.[hash].js），该块在访问该路由时被延迟加载。
        component: () => import(/* webpackChunkName: "about" */ '../views/Post.vue')
    },

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
